libxl: pass libxl__spawn_starting to libxl__spawn_spawn.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 24 May 2011 14:21:26 +0000 (15:21 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 24 May 2011 14:21:26 +0000 (15:21 +0100)
commitdec144fc05e319d768736c35ab18f7057b411afe
treec70f598f04ad60a5ad743a489960929b3a8234f1
parent06f5eeefcd9ca272be3a85dd51ddd535b751a555
libxl: pass libxl__spawn_starting to libxl__spawn_spawn.

Passing a libxl__device_model_starting to a generic function and expecting it
to scrobble inside for the generic data structure is a strange interface.
Instead pass in a libxl__spawn_starting and an opaque hook data pointer.

The for_spawn member of libxl__device_model_starting was annotated with
"first!", suggesting that someone intended to use pointer casting tricks to
move between the outer and inner struct. However the field is a pointer not a
inline struct so this doesn't work (and it isn't used this way anyhow). Remove
the comment, and move the field away from the front for good measure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_dm.c
tools/libxl/libxl_exec.c
tools/libxl/libxl_internal.h